//this undefined 的情况 https://segmentfault.com/q/1010000017998771/a-1020000021354468
// class BaseController {
//   //myClass.resolve('getA')
//   resolve(fn) {
//     return this[fn].bind(this);
//   }
// }
class BaseController {
  resolve() {
    return new Proxy(this, {
      get(target, name) {
        return target[name].bind(target);
      },
    });
  }
}
module.exports = BaseController;